﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Timetable.Base.Entities;
using Timetable.Base.Interfaces.Services.DataServices;
using Ninject;
using Timetable.Base.Interfaces.Repositories;
using Timetable.Base.Interfaces.Validators;

namespace Timetable.Data.Services.DataServices
{
    public class TimeService: BaseDataService<Time>
    {
        [Inject]
        public IRepository<Time> TimeRepository { get; set; }

        [Inject]
        public IValidator<Time> TimeValidator { get; set; }

        public override Base.Interfaces.Repositories.IRepository<Time> Repository
        {
            get { return TimeRepository; }
        }

        public override Base.Interfaces.Validators.IValidator<Time> Validator
        {
            get { return TimeValidator; }
        }

        public override IQueryable<Time> All()
        {
            return Repository.Get();
        }

        public override Time GetById(int id)
        {
            return Repository.GetById(id);
        }
    }
}
